<template>
    <a-table v-bind="attrs">
        <template #bodyCell="{ column, record, index }">
            <template v-if="column.key == 'action'">
                <a-space>
                    <a
                        v-for="a in attributes.action"
                        :key="a.id"
                        v-bind="a.attributes"
                        @click="a.onClick(record, index)"
                        >{{ a.label }}</a
                    >
                </a-space>
            </template>
        </template>
    </a-table>
</template>
<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
    name: "ml-basic-table",
    setup(props, { attrs }: { attrs: any }) {
        return {
            attrs,
        };
    },
});
</script>
